package org.cbg.panel;

import java.awt.CardLayout;

import javax.swing.JPanel;

import org.come.until.UserMessUntil;

/**
 * 我要卖 寄售商品 物品、灵宝、召唤兽分类 面板 CardLayout
 * 
 * @author Administrator
 * 
 */
public class TraslationWantSendJishoushangpinFenleiJpanel extends JPanel {

    private CardLayout cardLayout;

    private TraslationWantSendJishoushangpinFenleiWupinJpanel traslationWantSendJishoushangpinFenleiWupinJpanel;
    // private TraslationWantSendJishoushangpinFenleiLingbaoJpanel
    // traslationWantSendJishoushangpinFenleiLingbaoJpanel;
    private TraslationWantSendJishoushangpinFenleiZhaohuanshouJpanel traslationWantSendJishoushangpinFenleiZhaohuanshouJpanel;

    public TraslationWantSendJishoushangpinFenleiJpanel() {
        // TODO Auto-generated constructor stub
        cardLayout = new CardLayout();
        this.setBackground(null);
        this.setLayout(cardLayout);
        traslationWantSendJishoushangpinFenleiWupinJpanel = new TraslationWantSendJishoushangpinFenleiWupinJpanel();
        traslationWantSendJishoushangpinFenleiZhaohuanshouJpanel = new TraslationWantSendJishoushangpinFenleiZhaohuanshouJpanel();
        this.add(traslationWantSendJishoushangpinFenleiWupinJpanel, "wupin");
        this.add(traslationWantSendJishoushangpinFenleiZhaohuanshouJpanel, "zhaohuanshou");
        this.setBounds(68, 28, 385, 240);
        this.setOpaque(false);
    }

    /** 切换 */
    public void change(int i) {
        if (i == 0 || i == 1) {
            cardLayout.show(this, "wupin");
            traslationWantSendJishoushangpinFenleiWupinJpanel.change(i);
        } else if (i == 2) {
            for (int k = 0; k < UserMessUntil.getPetListTable().size(); k++) {
                traslationWantSendJishoushangpinFenleiZhaohuanshouJpanel.chang(UserMessUntil.getPetListTable().get(k),
                        true);
            }
            cardLayout.show(this, "zhaohuanshou");

        }
    }

    public CardLayout getCardLayout() {
        return cardLayout;
    }

    public void setCardLayout(CardLayout cardLayout) {
        this.cardLayout = cardLayout;
    }

    public TraslationWantSendJishoushangpinFenleiWupinJpanel getTraslationWantSendJishoushangpinFenleiWupinJpanel() {
        return traslationWantSendJishoushangpinFenleiWupinJpanel;
    }

    public void setTraslationWantSendJishoushangpinFenleiWupinJpanel(
            TraslationWantSendJishoushangpinFenleiWupinJpanel traslationWantSendJishoushangpinFenleiWupinJpanel) {
        this.traslationWantSendJishoushangpinFenleiWupinJpanel = traslationWantSendJishoushangpinFenleiWupinJpanel;
    }

    public TraslationWantSendJishoushangpinFenleiZhaohuanshouJpanel getTraslationWantSendJishoushangpinFenleiZhaohuanshouJpanel() {
        return traslationWantSendJishoushangpinFenleiZhaohuanshouJpanel;
    }

    public void setTraslationWantSendJishoushangpinFenleiZhaohuanshouJpanel(
            TraslationWantSendJishoushangpinFenleiZhaohuanshouJpanel traslationWantSendJishoushangpinFenleiZhaohuanshouJpanel) {
        this.traslationWantSendJishoushangpinFenleiZhaohuanshouJpanel = traslationWantSendJishoushangpinFenleiZhaohuanshouJpanel;
    }

}
